evtchn: simplify port_is_valid()
authorDavid Vrabel <david.vrabel@citrix.com>
Thu, 18 Jun 2015 12:53:23 +0000 (14:53 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 18 Jun 2015 12:53:23 +0000 (14:53 +0200)
commit01280dc19cf3da089f98faf4f524b54b5a191df0
treeab4ce056911c9ae339cfa336a2aebefa2523e7cf
parente320f14c6ad5e423c5fae088e69a72c42c9ad678
evtchn: simplify port_is_valid()

By keeping a count of the number of currently valid event channels,
port_is_valid() can be simplified.

d->valid_evtchns is only increased (while holding d->event_lock), so
port_is_valid() may be safely called without taking the lock (this
will be useful later).

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
xen/common/event_channel.c
xen/include/xen/event.h
xen/include/xen/sched.h